﻿using System.Collections.Generic;
using CoreLibrary.Repo;
using Entities.DataBase.Obj;
using Entities.DataBase.Persistent;

namespace Entities.DataBase {

    public interface IPurchaseRecordRepository : IRepository<PurchaseRecord> {

        string CreateRecord(PurchaseRecord record);
        string TransferRecord(TransferRecordReq request);

        void RemoveRecord(string recordId);
        PurchaseRecord UpdateRecord(string recordId, PurchaseRecordUpdator recordUpdator);

        PurchaseRecord GetRecord(string recordId);
        List<PurchaseRecordInfo> ListAllRecords();
        List<PurchaseRecordInfo> ListRecordsByUserId(string userId);
        List<PurchaseRecordInfo> ListRecordsByProductId(string productId);
        List<PurchaseRecordInfo> ListRecordsByKeyword(string keyword);
        List<PurchaseRecordInfo> ListRecordsByLocation(int location);
        List<PurchaseRecord>     ListRecordsByProductIdLocation(string productId, int location);

        PurchaseRecordSummary GetRecordSummary(string productId, int location);

    }

}